home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
- <head>
- <title>MyServer Documentation - HTTPS - www.myserverproject.net</title>
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
- <link rel="stylesheet" type="text/css" href="../style/myserver.css" />
- </head>
- <body>
-
- <table class="center" width="95%">
-
- <tr>
-
- <td class="center">
-
-
- <h1 class="title">HTTPS</h1>
-
-
- <br />
- <h2 class="title">Brief notes on data encryption</h2>
- The data encryption is used to protect the data that is sent between the client and
- the server. There are two types of algorithm: symmetric and asymmetric data
- encryption algorithms. The difference between the two types of algorithm is
- that for the symmetric algorithms the same key is used both for encryption and
- decryption. These algorithms are not used by servers with a potentially large
- number of clients because the data captured can be decrypted by any client
- that know the key and because the key needs to be distribuite in a safe
- manner(for example using a floppy disk) and not distributing it on a large
- network like internet. The asymmetric algorithms work in a different way,
- the data encrypted with a key can be decrypted only with the other key and
- viceversa. Anyone know the public key but only the owner knows the private
- one. In this way the key owner do not have to distribuite the key only to
- know clients but he can distributes it to a large scale network.
-
- <br />
- <br />
- <h2 class="title">How create SSL certificates with OpenSSL </h2>
- A certificate is needed to certify your identity through a
- CA(Certification Authority). You can use a certificate without register it to
- third party CA but creating a Root Certification certificate.
- You can find all the necessary to create certificates in the library
- OpenSSL at: www.openssl.org.
- After its installation go in the binaries directory and type:
- <br />
- <span class="code">
- openssl genrsa -out server.key
- </span>
- <br />
- This will create a private key for encode your data.
- <br />
- <br />
- After run this command:
- <br />
- <span class="code">
- openssl req -new -x509 -days 730 -config openssl.cnf -key server.key -out server.pem
- </span>
- <br />
- to create the public certificate. In this way the certificate can be used for
- 730 days and the public key will be the server.pem file.
- <br />
- <br />
-
- <h2 class="title">Use certificates in MyServer </h2>
- To configure certificates in MyServer you have to put the two files: server.key,
- server.pem in the certificates folder under the MyServer installation path.
- After this you have to configure an https virtual host in the virtualhosts.xml file.
- <br />
- <span class="code">
- <VHOST><br />
- <NAME>Every connection</NAME><br />
- <PORT>443</PORT><br />
- <SSL_PRIVATEKEY>certificates/server.key</SSL_PRIVATEKEY><br />
- <SSL_CERTIFICATE>certificates/server.pem</SSL_CERTIFICATE><br />
- <PROTOCOL>HTTPS</PROTOCOL><br />
- <DOCROOT>web</DOCROOT><br />
- <SYSFOLDER>system</SYSFOLDER><br />
- <ACCESSLOG>logs/myServer.log</ACCESSLOG><br />
- <WARNINGLOG>logs/myServer.err</WARNINGLOG><br />
- </VHOST><br />
- </span>
- <br />
- With this host we put an https listener on the port 443(the default one for HTTPS)
- and we use the file certificates/server.key for the private key and the
- certificates/server.pem file for the public one.
- </td>
- </tr>
- </table>
- </body>
- </html>
-
-